#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QDialog>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    QDialog* log=new QDialog(this);
    log->resize(200,100);
    log->setAttribute(Qt::WA_DeleteOnClose);//关闭窗口销毁内存
   log->show();//非模态的显示方式，不阻塞
}
